﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using RoverStudio.Common.PositionSource;
using WebcamDShow;

namespace RoverStudio.GUI.CameraViewPanel
{
    public partial class CameraViewPanelForm : RoverStudio.GUI.Workbench.ChildForm
    {
        public CameraViewPanelForm()
        {
            InitializeComponent();
        }

        //public CameraWindow Display
        //{
        //    get
        //    {
        //        return cameraWindow;
        //    }
        //}

        private void btnRefresh_Click(object sender, EventArgs e)
        {
            cbVideoSource.DisplayMember = "Name";
            cbVideoSource.DataSource = VideoSourceCommonInstancesHolder.SingletonInstance.VideoSources;
        }

        private void cbVideoSource_SelectedIndexChanged(object sender, EventArgs e)
        {
            cameraWindow.VideoSource = (IVideoSourceCommon)cbVideoSource.SelectedItem;
         }

  
    }
}
